package api

import (
	"gominio/api/controller"
	"gominio/config"

	"github.com/gin-gonic/gin"
	"github.com/minio/minio-go/v7"
)

func RegisterRoutes(group *gin.RouterGroup, gominio *minio.Client, conf *config.Config) {
	NewFileRouter(group, gominio, conf)
}
func NewFileRouter(group *gin.RouterGroup, gominio *minio.Client, conf *config.Config) {
	fc := &controller.FileController{
		Gominio: gominio,
		Conf:    conf,
	}
	group.GET("/list", fc.List)
	group.GET("/download", fc.Download)
	group.GET("/delete", fc.Delete)
	group.POST("/upload_photo", fc.Upload)
	group.POST("/upload_single_file", fc.UploadAny)
}
